import request from '@/config/axios'

export type ColorVO = {
  id: string,
  colorName: string,
  color1: string,
  color2: string,
  remark: string,
}

export const getColorPage = (params: PageParam): Promise<{
  total: number,
  list: ColorVO[]
}> => request.get({
  url: '/business/color/page',
  params
})
export const getColor = (id: string): Promise<ColorVO> => request.get({
  url: `/business/color/${id}`
})

export const delColorList = (ids: string[]): Promise<ColorVO> => request.get({
  url: `/business/color/delete`,
  params: {ids: ids.join(',')}
})
export const createColor = (data: ColorVO) => request.post({
  url: `/business/color/create`,
  data
})
export const updateColor = (data: ColorVO) => request.post({
  url: `/business/color/update`,
  data
})

